import Chart from "@/components/Chart";
import { useAppSelector } from "@/store/hooks";

const dataY = [150, 230, 224, 218, 135, 147, 260];

export default function LineChartComp() {
  const lineOptions = useAppSelector((state) => state.echarts.lineOptions);
  const options = {
    ...lineOptions,
    xAxis: {
      ...lineOptions.xAxis,
      data: [
        "2024-01-01",
        "2024-01-02",
        "2024-01-03",
        "2024-01-04",
        "2024-01-05",
        "2024-01-06",
        "2024-01-07",
      ],
    },
    series: [
      {
        ...lineOptions.series[0],
        data: dataY,
      },
    ],
  };

  return <Chart options={options}></Chart>;
}
